<script type="text/javascript" src="<?php echo js_url() . "chat.js"; ?>" >
</script>
<style>
    .img{
        width:50px;
        height:50px;
    }
</style>
<script type="text/javascript">
    var notifNumber = <?php echo $notifsNumber; ?>;

    var whatsUpUrl = "<?php echo site_url("notifications/whatsUp/"); ?>" + "/";

    var sendUrl = "<?php echo site_url("chat/send"); ?>";

    var newsUrl = "<?php echo site_url("chat/getNews"); ?>";

    var withUrl = "<?php echo site_url("chat/with"); ?>";

    var tofsUrl = "<?php echo css_url("chat/with") . "../pht/"; ?>";

    var delNotifsUrl = "<?php echo site_url("chat/delNotifs"); ?>";

    $(document).ready(function() {
        // $("#scrollDiv").jScrollPane({showArrows:true});
        console.log("tofsUrl = " + tofsUrl);
        $("#frm_chat_sub").click(function() {
            send("frm_chat");
            return false;
        });

        //Pour les notifications
        update(notifNumber);
        ajaxStop();
        waterMark(".waterMarkInput");
        waterMark(".search");
    });

</script>
<div class="span4">
    <div class="row">
        <div class="span4 rounded" id="chatingWith">

        </div>
    </div>
    <div class="row">
        <div  class="span4 rounded" id="discussion" >

            <?php
            if (isset($discussion)) {
                foreach ($discussion as $row) {
                    $this->load->view("message", array('msg' => $row));
                }
            }
            ?>

        </div>
    </div>
    <div class="row">
        <div class="span4" >
            <?php
            echo form_open("chat/send", array("id" => "frm_chat"));
            ?>
        <!--                    <input class="waterMarkInput" title="Your message here" size="33" id="chatText"  name="message" />-->
            <div class="input-append">
                <textarea  id="chatText"  name="message" class="input-large" rows="2"></textarea>
                <button class="btn btn-primary" type="submit" id="frm_chat_sub" style="height:50px;">
                    Send  <i class="icon-white icon-ok"></i>
                </button>
            </div>
            <input type="hidden" value="" id="withId" name="with"  />
            <?php
            echo form_close();
            ?>

        </div>
    </div>
</div>
<div class="span5">
    <div class="row" >
        <?php
        $this->load->view("v_users");
        ?>
    </div>
</div>

